﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Input;

namespace TrenchcoatRobots.Datatypes.Input {
	/// <summary>
	/// GamePadTriggerInput is used to get input from the triggers of a GamePad. The values are gradual, approaching one as the trigger is more and more depressed.
	/// </summary>
	class GamePadTriggerInput : GameInput {
		bool left;

		public override void Update( ref GamePadState gps ) {
			if ( left ) {
				base.Value = gps.Triggers.Left;
			}
			else {
				base.Value = gps.Triggers.Right;
			}
		}
		public GamePadTriggerInput( bool useLeftTrigger, string name )
			: base( name ) {
			left = useLeftTrigger;
		}
	}
}
